import request from '@/utils/request'
import apis from '@/api/index'

export function getLicenseUpload (id) {
  return request({
    url: `${apis.ThreeUpload}?cb_id=${id}`,
    method: 'get'
  })
}

export function postLicenseUpload (id, data) {
  return request({
    url: `${apis.ThreeUpload}?cb_id=${id}`,
    method: 'post',
    data: data
  })
}

export function getLicenseDownload (id) {
  return request({
    url: `${apis.ThreeDownload}?cb_id=${id}`,
    method: 'get'
  })
}

export function getHistory (id) {
  return request({
    url: `${apis.ThreeHistory}?cb_id=${id}`,
    method: 'get'
  })
}

export function getView (id) {
  return request({
    url: `${apis.ThreeView}?cb_id=${id}`,
    method: 'get'
  })
}

export function getMaterialTidy (parameter) {
  return request({
    url: apis.ThreeMaterialTidy,
    method: 'get',
    params: parameter
  })
}

export function getOffficial (parameter) {
  return request({
    url: apis.ThreeOfficialList,
    method: 'get',
    params: parameter
  })
}

export function getOfficialEdit (id) {
  return request({
    url: `${apis.ThreeOfficialEdit}?cb_id=${id}`,
    method: 'get'
  })
}

export function postOfficialEdit (id, data) {
  return request({
    url: `${apis.ThreeOfficialEdit}?cb_id=${id}`,
    method: 'post',
    data: data
  })
}

export function getDownloadMaterial (id) {
  return request({
    url: `${apis.ThreeMaterial}?cb_id=${id}`,
    method: 'get'
  })
}

export function getArrangeEdit (id) {
  return request({
    url: `${apis.ThreeArrangeEdit}?cb_id=${id}`,
    method: 'get'
  })
}

export function postArrangeEdit (id, data) {
  return request({
    url: `${apis.ThreeArrangeEdit}?cb_id=${id}`,
    method: 'post',
    data: data
  })
}

export function getCollectList (parameter) {
  return request({
    url: apis.ThreeCollectList,
    method: 'get',
    params: parameter
  })
}

export function getReceiptList (id) {
  return request({
    url: `${apis.ThreeReceiptList}?cb_id=${id}`,
    method: 'get'
  })
}

export function getReceiptState (id) {
  return request({
    url: `${apis.ThreeReceiptState}?cb_id=${id}`,
    method: 'get'
  })
}

export function postReceiptState (id, data) {
  return request({
    url: `${apis.ThreeReceiptState}?cb_id=${id}`,
    method: 'post',
    data: data
  })
}

export function getReceiptDelete (id) {
  return request({
    url: `${apis.ThreeReceiptDelete}?cbs_id=${id}`,
    method: 'get'
  })
}
